import request from '@/utils/request'

// 订单统计 type 时间类型, 周-week,月-month,年-year
export function getOrder(query) {
  return request({
    url: '/system/dashbord/order-num',
    method: 'get',
    params: query
  })
}

// 销售额统计 type 时间类型, 周-week,月-month,年-year
export function getSales(query) {
    return request({
      url: '/system/dashbord/sales-volume',
      method: 'get',
      params: query
    })
  }


/**
 * 订单排行榜
 * @param {*} query 
 * tenantType 租户类型, agent-渠道商，hospital-医院，inspection-检验所
 * limit 排行数目，默认为5,示例值(5)
 */
export function getRank(query) {
  return request({
    url: '/system/dashbord/order-ranking',
    method: 'get',
    params: query
  })
}

/**
 * 数据总览
 * @param {*} query 
 */
 export function getOverview(query) {
    return request({
      url: '/system/dashbord/over-view',
      method: 'get',
      params: query
    })
  }
